home *** CD-ROM | disk | FTP | other *** search
- Attribute VB_Name = "CameraMethods"
- '******************************************************************'
- '* *'
- '* TurboCAD for Windows *'
- '* Copyright (c) 1993 - 2001 *'
- '* International Microcomputer Software, Inc. *'
- '* (IMSI) *'
- '* All rights reserved. *'
- '* *'
- '******************************************************************'
-
- Public Sub Camera_Plan(ByVal TheView As View)
- If (TheView.SpaceMode = imsiPaperSpace) Then
- MsgBox "Camera's properties can be changed only in model space"
- Exit Sub
- 'Camera's properties can be changed only in model space
- End If
- Dim Cam1 As Object 'Camera 'IMSIGX.XCamera
- Dim Vpos As XVertex
- Dim VLookAt As Vertex
- Dim VerUp As Vertex
-
- Set Cam1 = TheView.Camera
- Set Vpos = New XVertex
- Set VLookAt = Vpos.Duplicate
- Set VerUp = Vpos.Duplicate
-
- Vpos.X = 0
- Vpos.Y = 0
- Vpos.Z = 1
-
- VLookAt.X = 0
- VLookAt.Y = 0
- VLookAt.Z = 0
-
- VerUp.X = 0
- VerUp.Y = 1
- VerUp.Z = 0
- Cam1.CameraSetSpaceParameters Vpos, VLookAt, VerUp
- TheView.Refresh
- TheView.ZoomToExtents
- TheView.Update = False
- Set VerUp = Nothing
- Set Vpos = Nothing
- Set VLookAt = Nothing
- Set Cam1 = Nothing
-
- End Sub
- Public Sub Camera_Right(TheView As View)
- If (TheView.SpaceMode = imsiPaperSpace) Then
- MsgBox "Camera's properties can be changed only in model space"
- Exit Sub
- 'Camera's properties can be changed only in model space
- End If
- Dim Cam1 As XCamera
- Dim Vpos As XVertex
- Dim VLookAt As Vertex
- Dim VerUp As Vertex
-
- Set Cam1 = TheView.Camera
- Set Vpos = New XVertex
- Set VLookAt = Vpos.Duplicate
- Set VerUp = Vpos.Duplicate
-
- Vpos.X = 1
- Vpos.Y = 0
- Vpos.Z = 0
-
- VLookAt.X = 0
- VLookAt.Y = 0
- VLookAt.Z = 0
-
- VerUp.X = 0
- VerUp.Y = 0
- VerUp.Z = 1
-
- Cam1.CameraSetSpaceParameters Vpos, VLookAt, VerUp
- TheView.ZoomToExtents
- TheView.Refresh
-
- Set VerUp = Nothing
- Set Vpos = Nothing
- Set VLookAt = Nothing
- Set Cam1 = Nothing
-
- End Sub
-
-
- Public Sub Camera_Left(TheView As View)
- If (TheView.SpaceMode = imsiPaperSpace) Then
- MsgBox "Camera's properties can be changed only in model space"
- Exit Sub
- 'Camera's properties can be changed only in model space
- End If
- Dim Cam1 As XCamera
- Dim Vpos As XVertex
- Dim VLookAt As Vertex
- Dim VerUp As Vertex
-
- Set Cam1 = TheView.Camera
- Set Vpos = New XVertex
- Set VLookAt = Vpos.Duplicate
- Set VerUp = Vpos.Duplicate
-
- Vpos.X = -1
- Vpos.Y = 0
- Vpos.Z = 0
-
- VLookAt.X = 0
- VLookAt.Y = 0
- VLookAt.Z = 0
-
- VerUp.X = 0
- VerUp.Y = 0
- VerUp.Z = 1
-
- Cam1.CameraSetSpaceParameters Vpos, VLookAt, VerUp
- TheView.ZoomToExtents
- TheView.Refresh
-
- Set VerUp = Nothing
- Set Vpos = Nothing
- Set VLookAt = Nothing
- Set Cam1 = Nothing
-
- End Sub
-
- Public Sub Camera_Front(TheView As View)
- If (TheView.SpaceMode = imsiPaperSpace) Then
- MsgBox "Camera's properties can be changed only in model space"
- Exit Sub
- 'Camera's properties can be changed only in model space
- End If
- Dim Cam1 As XCamera
- Dim Vpos As XVertex
- Dim VLookAt As Vertex
- Dim VerUp As Vertex
-
- Set Cam1 = TheView.Camera
- Set Vpos = New XVertex
- Set VLookAt = Vpos.Duplicate
- Set VerUp = Vpos.Duplicate
-
- Vpos.X = 0
- Vpos.Y = -1
- Vpos.Z = 0
-
- VLookAt.X = 0
- VLookAt.Y = 0
- VLookAt.Z = 0
-
- VerUp.X = 0
- VerUp.Y = 0
- VerUp.Z = 1
-
- Cam1.CameraSetSpaceParameters Vpos, VLookAt, VerUp
- TheView.ZoomToExtents
- TheView.Refresh
-
- Set VerUp = Nothing
- Set Vpos = Nothing
- Set VLookAt = Nothing
- Set Cam1 = Nothing
-
- End Sub
-
-
- Public Sub Camera_Back(TheView As View)
- If (TheView.SpaceMode = imsiPaperSpace) Then
- MsgBox "Camera's properties can be changed only in model space"
- Exit Sub
- 'Camera's properties can be changed only in model space
- End If
- Dim Cam1 As XCamera
- Dim Vpos As XVertex
- Dim VLookAt As Vertex
- Dim VerUp As Vertex
-
- Set Cam1 = TheView.Camera
- Set Vpos = New XVertex
- Set VLookAt = Vpos.Duplicate
- Set VerUp = Vpos.Duplicate
-
- Vpos.X = 0
- Vpos.Y = 1
- Vpos.Z = 0
-
- VLookAt.X = 0
- VLookAt.Y = 0
- VLookAt.Z = 0
-
- VerUp.X = 0
- VerUp.Y = 0
- VerUp.Z = 1
-
- Cam1.CameraSetSpaceParameters Vpos, VLookAt, VerUp
- TheView.ZoomToExtents
- TheView.Refresh
-
- Set VerUp = Nothing
- Set Vpos = Nothing
- Set VLookAt = Nothing
- Set Cam1 = Nothing
-
- End Sub
-
- Public Sub Camera_Bottom(TheView)
- If (TheView.SpaceMode = imsiPaperSpace) Then
- MsgBox "Camera's properties can be changed only in model space"
- Exit Sub
- 'Camera's properties can be changed only in model space
- End If
- Dim Cam1 As XCamera
- Dim Vpos As XVertex
- Dim VLookAt As Vertex
- Dim VerUp As Vertex
-
- Set Cam1 = TheView.Camera
- Set Vpos = New XVertex
- Set VLookAt = Vpos.Duplicate
- Set VerUp = Vpos.Duplicate
-
- Vpos.X = 0
- Vpos.Y = 0
- Vpos.Z = 1 '-1
-
- VLookAt.X = 0
- VLookAt.Y = 0
- VLookAt.Z = 0
-
- VerUp.X = 0
- VerUp.Y = -1 '1
- VerUp.Z = 0
-
- Cam1.CameraSetSpaceParameters Vpos, VLookAt, VerUp
- TheView.ZoomToExtents
- TheView.Refresh
-
- Set VerUp = Nothing
- Set Vpos = Nothing
- Set VLookAt = Nothing
- Set Cam1 = Nothing
-
- End Sub
- Public Sub Camera_ISO_SE(TheView As View)
- If (TheView.SpaceMode = imsiPaperSpace) Then
- MsgBox "Camera's properties can be changed only in model space"
- Exit Sub
- 'Camera's properties can be changed only in model space
- End If
- Dim Cam1 As XCamera
- Dim Vpos As XVertex
- Dim VLookAt As Vertex
- Dim VerUp As Vertex
-
- Set Cam1 = TheView.Camera
-
- Set Vpos = New XVertex
- Set VLookAt = Vpos.Duplicate
- Set VerUp = Vpos.Duplicate
-
- Vpos.X = 1
- Vpos.Y = -1
- Vpos.Z = 1
-
- VLookAt.X = 0
- VLookAt.Y = 0
- VLookAt.Z = 0
-
- VerUp.X = 0
- VerUp.Y = 0
- VerUp.Z = 1
-
- Cam1.CameraSetSpaceParameters Vpos, VLookAt, VerUp
- TheView.ZoomToExtents
- TheView.Refresh
-
- Set VerUp = Nothing
- Set Vpos = Nothing
- Set VLookAt = Nothing
- Set Cam1 = Nothing
-
- End Sub
-
- Public Sub Camera_ISO_NE(TheView As View)
- If (TheView.SpaceMode = imsiPaperSpace) Then
- MsgBox "Camera's properties can be changed only in model space"
- Exit Sub
- 'Camera's properties can be changed only in model space
- End If
- Dim Cam1 As XCamera
- Dim Vpos As XVertex
- Dim VLookAt As Vertex
- Dim VerUp As Vertex
-
- Set Cam1 = TheView.Camera
- Set Vpos = New XVertex
- Set VLookAt = Vpos.Duplicate
- Set VerUp = Vpos.Duplicate
-
- Vpos.X = 1
- Vpos.Y = 1
- Vpos.Z = 1
-
- VLookAt.X = 0
- VLookAt.Y = 0
- VLookAt.Z = 0
-
- VerUp.X = 0
- VerUp.Y = 0
- VerUp.Z = 1
-
- Cam1.CameraSetSpaceParameters Vpos, VLookAt, VerUp
- TheView.ZoomToExtents
- TheView.Refresh
-
- Set VerUp = Nothing
- Set Vpos = Nothing
- Set VLookAt = Nothing
- Set Cam1 = Nothing
- Set Vi = Nothing
- Set ActDr = Nothing
-
- End Sub
-
-
- Public Sub Camera_ISO_SW(TheView As View)
- If (TheView.SpaceMode = imsiPaperSpace) Then
- MsgBox "Camera's properties can be changed only in model space"
- Exit Sub
- 'Camera's properties can be changed only in model space
- End If
- Dim Cam1 As XCamera
- Dim Vpos As XVertex
- Dim VLookAt As Vertex
- Dim VerUp As Vertex
-
- Set Cam1 = TheView.Camera
- Set Vpos = New XVertex
- Set VLookAt = Vpos.Duplicate
- Set VerUp = Vpos.Duplicate
-
- Vpos.X = -1
- Vpos.Y = -1
- Vpos.Z = 1
-
- VLookAt.X = 0
- VLookAt.Y = 0
- VLookAt.Z = 0
-
- VerUp.X = 0
- VerUp.Y = 0
- VerUp.Z = 1
-
- Cam1.CameraSetSpaceParameters Vpos, VLookAt, VerUp
- TheView.ZoomToExtents
- TheView.Refresh
-
- Set VerUp = Nothing
- Set Vpos = Nothing
- Set VLookAt = Nothing
- Set Cam1 = Nothing
-
- End Sub
-
-
- Public Sub Camera_ISO_NW(TheView As View)
- If (TheView.SpaceMode = imsiPaperSpace) Then
- MsgBox "Camera's properties can be changed only in model space"
- Exit Sub
- 'Camera's properties can be changed only in model space
- End If
- Dim Cam1 As XCamera
- Dim Vpos As XVertex
- Dim VLookAt As Vertex
- Dim VerUp As Vertex
-
- Set Cam1 = TheView.Camera
-
- Set Vpos = New XVertex
- Set VLookAt = Vpos.Duplicate
- Set VerUp = Vpos.Duplicate
-
- Vpos.X = -1
- Vpos.Y = 1
- Vpos.Z = 1
-
- VLookAt.X = 0
- VLookAt.Y = 0
- VLookAt.Z = 0
-
- VerUp.X = 0
- VerUp.Y = 0
- VerUp.Z = 1
-
- Cam1.CameraSetSpaceParameters Vpos, VLookAt, VerUp
- TheView.ZoomToExtents
- TheView.Refresh
-
- Set VerUp = Nothing
- Set Vpos = Nothing
- Set VLookAt = Nothing
- Set Cam1 = Nothing
- End Sub
-
-